//
//  OJComment.h
//  openJira
//
//  Created by Vincent Demay on 01/05/10.
//  Copyright 2010 Goojet. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "OJConnector.h"
#import "OJXMLRPCModel.h"
#import "OJIssue.h"

@class OJIssue;
@class OJXMLRPCModel;

@protocol OJCommentDelegate;

@interface OJComment : OJXMLRPCModel {
	NSString* updated;
	NSString* author;
	NSString* body;
	
	id<OJCommentDelegate> delegate;
}
@property (nonatomic, retain) NSString* updated;
@property (nonatomic, retain) NSString* author;
@property (nonatomic, retain) NSString* body;
@property (nonatomic, assign) id<OJCommentDelegate> delegate;

- (void) addToIssue:(OJIssue*) issue;

@end

@protocol OJCommentDelegate
- (void) object:(OJComment*) comment isSent:(BOOL) onError;

@end



/////////////////////// OJCOMMENTFILTER ////////////////////////
@protocol OJCommentListDelegate;

@interface OJCommentList : OJXMLRPCModel {
	NSMutableArray *comments;
	id<OJCommentListDelegate> delegate;
}
@property (nonatomic, retain) NSMutableArray *comments;
@property (nonatomic, assign) id<OJCommentListDelegate> delegate;
- (void) getCommentsForIssue:(OJIssue*) issue;
@end


@protocol OJCommentListDelegate
- (void) object:(OJCommentList*) commentList isReady:(BOOL) onError;

@end

